/*
 * Gebruiker.java
 *
 * Created on 24 februari 2008, 19:40
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package data;

import java.util.Date;

/**
 *
 * @author Administrator
 */
public class Gebruiker {
    
    private String nickname;
    private String paswoord;
    private String email;
    private String geslacht;
    private String hobbys;
    private String extra;
    private String avatar;
    private Date geboortedatum;
    private boolean online;
    private boolean gaming;
    private int scoreId;
    
    
    /** Creates a new instance of Gebruiker */
    public Gebruiker() {
    }
    
    public String toString(){
        return getNickname();
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getPaswoord() {
        return paswoord;
    }

    public void setPaswoord(String paswoord) {
        this.paswoord = paswoord;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getGeslacht() {
        return geslacht;
    }

    public void setGeslacht(String geslacht) {
        this.geslacht = geslacht;
    }

    public String getHobbys() {
        return hobbys;
    }

    public void setHobbys(String hobbys) {
        this.hobbys = hobbys;
    }

    public String getExtra() {
        return extra;
    }

    public void setExtra(String extra) {
        this.extra = extra;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public Date getGeboortedatum() {
        return geboortedatum;
    }

    public void setGeboortedatum(Date geboortedatum) {
        this.geboortedatum = geboortedatum;
    }

    public boolean isOnline() {
        return online;
    }

    public void setOnline(boolean online) {
        this.online = online;
    }

    public int getScoreId() {
        return scoreId;
    }

    public void setScoreId(int scoreId) {
        this.scoreId = scoreId;
    }

    public boolean isGaming() {
        return gaming;
    }

    public void setGaming(boolean gaming) {
        this.gaming = gaming;
    }
    
    public String convertToXML(){    
        return "<gebruiker>" +
                    "<nickname>"+getNickname()+"</nickname>"+
                    "<password>"+getPaswoord()+"</password>"+"" +
                    "<email>"+getEmail()+"</email>" +
                    "<geslacht>"+getGeslacht()+"</geslacht>" +
                    "<geboortedatum>"+getGeboortedatum().getTime()+"</geboortedatum>" +
                    "<hobby>"+getHobbys()+"</hobby>" +
                    "<extra>"+getExtra()+"</extra>" +
                    "<avatar>"+getAvatar()+"</avatar>" +
                    "<scoreid>"+getScoreId()+"</scoreid>" +
                    "<isOnline>"+ isOnline()+"</isOnline>" +
                    "<isGaming>"+isGaming()+"</isGaming>" +
                 "</gebruiker>";
    }
    
    public String convertToString(){
        return  getNickname() + ";" + 
                getPaswoord() + ";" + 
                getEmail() + ";" + 
                getGeslacht() + ";" + 
                getGeboortedatum().getTime() + ";" + 
                getHobbys() + ";" + 
                getExtra() + ";" + 
                getAvatar() + ";" + 
                getScoreId() + ";" + 
                isOnline() + ";" + 
                isGaming();
    }
    
}
